<template>
  <div class="app-container">
    <Table
      :show-add-button="false"
      :columns="columns"
      :page-function="page"
      :save-all-function="saveAll"
      ref="table"
    >
    </Table>
  </div>
</template>

<script>
import { saveAll, page } from '@/api/order'
import Table from '@/components/Table/index'

export default {
  name: 'Order',
  components: { Table },
  data() {
    return {
      saveAll: saveAll,
      page: page,
      row:{},
      columns: [
        {
          prop: 'id',
          label: '序号',
          width: '80',
          form: {
            key: 'id',
            label: 'id',
          },
        },
        {
          prop: 'user.name',
          label: '购买人',
          width: '180',
          form: {
            key:'user'
          }
        },
        {
          prop: 'product.name',
          label: '商品名',
          width: '180',
          form: {
            key:'product'
          }
        },
        {
          prop: 'address',
          label: '地址',
          width: '180',
          form: {
            key: 'address',
            label: '地址',
            type: 'input',
          }
        },
        {
          form: {
            key: 'skus',
          }
        },
        {
          form: {
            key: 'user',
          }
        },
        {
          prop: 'createTime',
          label: '创建时间',
          width: '200px'
        },
        {
          prop: 'updateTime',
          label: '更新时间',
          width: '200px'
        },
        {
          label: '操作',
          type: 'action',
          buttons: [
          ]
        }
      ]
    }
  },

  methods: {
  }
}
</script>

<style scoped>

</style>
